package kr.co.waitnumber.site.web.tag;

import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class FunctionTag extends BodyTagSupport {
	public int doAfterBody() throws JspTagException {
		PagingTag parent = (PagingTag) findAncestorWithClass(this, PagingTag.class);

		if (parent == null) {
			throw new JspTagException("�θ� �±�(PagingTag)�� ��4ϴ�.");
		}

		String function = getBodyContent().getString().trim();
		parent.setFunction(function);
		return SKIP_BODY;
	}
}
